Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some response values as attributes to the azcosmos traces #23652

Merged
merged 3 commits into from
Oct 23, 2024

Conversation

kjg
Copy link
Contributor

@kjg kjg commented Oct 23, 2024

When #23268 was being considered there was a request to add attributes based on the response.

This PR adds db.cosmosdb.request_charge and db.cosmosdb.status_code to all requests (at least the ones that make use of executeAndEnsureSuccessResponse which appear to be all of them right now.

I could not figure out how to get the sub status code out of the HTTP response. I'd be happy to add it here or in a follow up if I can get some help as to where to find it in the response.

Refs: #23308

  • The purpose of this PR is explained in this or a referenced issue.
  • The PR does not update generated files.
  • Tests are included and/or updated for code changes.
  • Updates to module CHANGELOG.md are included.
  • MIT license headers are included in each file.

@github-actions github-actions bot added Community Contribution Community members are working on the issue Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Oct 23, 2024
Copy link

Thank you for your contribution @kjg! We will review the pull request and get back to you soon.

@kjg kjg marked this pull request as ready for review October 23, 2024 22:08
Copy link
Member

@Pilchie Pilchie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me, but would like another set of 👀

sdk/data/azcosmos/cosmos_client.go Show resolved Hide resolved
Copy link
Member

@analogrelay analogrelay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me too.

sdk/data/azcosmos/cosmos_client.go Show resolved Hide resolved
@analogrelay analogrelay merged commit d3770d9 into Azure:main Oct 23, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Contribution Community members are working on the issue Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants